package com.tjetc.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tjetc.entity.ActivityType;
import com.tjetc.entity.Tribe;
import com.tjetc.mapper.ActivityTypeMapper;
import com.tjetc.service.IActivityTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class ActivityTypeServiceImpl extends ServiceImpl<ActivityTypeMapper, ActivityType> implements IActivityTypeService {
    @Resource
    private ActivityTypeMapper activityTypeMapper;

    @Override
    public PageInfo<ActivityType> lists(Integer curPage, Integer pageSize, String name) {
        PageHelper.startPage(curPage,pageSize);
        List<ActivityType> list=activityTypeMapper.list(name);
        return new PageInfo<>(list);
    }
}
